﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Learn_abstract
{
    class Program
    {
        static void Main(string[] args)
        {
            Rectangle r = new Rectangle(10, 7);
            double a = r.area();
            Console.WriteLine("area: {0}", a);
        }
    }

    abstract class Shape
    {
        abstract public int area();
    }

    class Rectangle: Shape
    {
        private int length;
        private int width;

        public Rectangle(int a, int b)
        {
            this.length = a;
            this.width  = b;
        }

        public override int area()
        {
            Console.WriteLine("Rectangle area is:");
            return length * width;
        }
    }
}
